﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.IO;
using System.Windows.Input;
using System.Windows.Controls;
using iControl.Windows;
using System.Diagnostics;

namespace iControl
{
	/// <summary>
	/// Interaction logic for App.xaml
	/// </summary>
	public partial class App: Application
	{
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Process currentProcess = Process.GetCurrentProcess();
            Process[] processes = Process.GetProcessesByName(currentProcess.ProcessName);
            if( processes.Length > 1 )
                currentProcess.Kill();
        }
    }
}
